Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- 64 bit



  Penrose Tiling in Obfuscated Python

Here’s a Python script which renders some Penrose tiling. Yes, this is valid Python code: _ =\ """if! 1:"e,V=100 0,(0j-1)**-.2; v,S=.5/ V.real, [(0,0,4 *e,4*e* V)];w=1 -v"def! E(T,A, B,C):P ,Q,R=B*w+ A*v,B*w+C ...

   Python,Disorder,Code,Writing,Style     2011-09-14 11:57:34

  Use DTrace to diagnose gdb issues

A few days ago, I installed the newest 64-bit gdb program (version 7.7.1) on Solaris 10 (X86_64 platform) to debug programs. After playing with the gdb a day, I found 2 issues about gdb:(1) The "set follow-fork-mode child" command doesn't take effect. By default, after the parent process forks the child process, the gdb will track the parent process, so this command can make gdb begin to follow the child process. But this command works OK on Linux.(2) The gdb can't parse the 32-bit application c...

   DTrace, debug, gdb, UNIX     2014-06-28 05:11:20

  How big are PHP arrays (and values) really? (Hint: BIG!)

Upfront I want to thank Johannes and Tyrael for their help in finding some of the more hidden memory usage. In this post I want to investigate the memory usage of PHP arrays (and values in general) using the following script as an example, which creates 100000 unique integer array elements and measures the resulting memory usage: <?php $startMemory = memory_get_usage(); $array = range(1, 100000); echo memory_get_usage() - $startMemory, ' bytes'; How much would you expect it to ...

   PHP,Array,Memory occupation,Garbage collection     2011-12-16 10:06:04

  10 Points about Java heap memory

When I started java programming I didn't know what is java heap or what is heap space in Java, I was even not aware of where does object in Java gets created, it’s when I started doing professional programming I came across error java.lang.outofmemoryerror then I realized What is Heap in Java or Java Heap Space. Its happens with most of programmer because learning language is easy but learning basics is difficult since there is no formal process which can teach you every basics of pro...

   Java,Heap memory,Tips     2012-02-20 05:38:06

  Google is missing in the photo with Chinese president Xi Jinping

Chinese president Xi Jinping has started his formal visit to US on 22nd September. The first stop is Seattle where Microsoft and Amazon headquarters are located. On 23rd September (Wednesday), Xi Jinping attended a forum named "The 8th US-China Internet Industry Forum" in Seattle.  On this forum, president Xi expressed the attitude of Chinese government to Internet. He advocated to build an peaceful, secure, open and collaborative Internet environment so that every country can benefit from ...

   NEWS,GOOGLE,CHINA,XI JINPING     2015-09-24 03:54:18

  How Integers Should Work (In Systems Programming Languages)

My last post outlined some of the possibilities for integer semantics in programming languages, and asked which option was correct. This post contains my answers. Just to be clear: I want practical solutions, but I’m not very interested by historical issues or backwards compatibility with any existing language, and particularly not with C and C++. We’ll start with: Premise 1: Operations on default integer types return the mathematically correct result or else trap. This is th...

   Number,Algorithm,System,Embedded system     2011-12-05 12:48:41

  Writing unit tests for legacy code – an open letter to developers I work with

This is an email I sent today to developers who work with me, it is exactly as I wrote it except for project and developer names which I’ve redacted. Dear Developers, S asked me a difficult question today, and I think the answer (which took me a few minutes to arrive at) is worth sharing with all developers, mainly because many of you will surely face the exact same problem especially in [maintenance and enhancement] projects. By now I think it is crystal clear that one of our non-ne...

   Unit testing,Open letter     2012-02-09 05:39:56

  It makes nothing but sense...Mobile Payment...

Chinese New Year is around the corner, every place in China and lots of places in the work have been in the CNY mode. People are rushing out to get all the stuff ready to welcome the New Year Eveand the Spring Festival. I also packed my stuff and flew back to my howntown in China to enjoy the great moment to stay with families and hang out with friends whom I have't been seeing for almost one year. I am exited... However, the first thing stunned me is not my friends but the mobile payment s...

   CHINA,WECHAT PAY,ALIPAY,MOBILE PAYMENT     2018-02-12 00:07:46

  Python: copying a list the right way

new = old[:] Those proficient in Python know what the previous line do. It copies the list old into new. This is confusing for beginners and should be avoided. Sadly the [:] notation is widely used, probably because most Python programmers don’t know a better way of copying lists.A little bit of pythonic theoryFirst we need to understand how Python manages objects & variables. Python doesn’t have variables like C. In C a variable is not just a name, it ...

   Python,List,Copy,Reference,[:],list()     2011-11-07 08:04:48

  Some famous article aggregators

Blogs are still very important places for people sharing their thoughts about something although some social media platforms have replaced some of these capabilities. As a blog writer, how can you let others know what you are thinking about? Besides your friends and social media platforms, there are some article aggregators around us which can help us promote our articles. Other than some aggregators like Google News, readers can submit articles to these sites themselves What are some famous art...

   News aggregator,Reddit,Digg,Hacker News     2013-08-12 03:34:37